if ((pos = host.indexOf(':')) < 0) {
port = 80;
} else {
port = NumberTools.parseIntDecSubstring(host, pos + 1);
host = host.substring(0, pos);
}
if ((pos = host.indexOf(':')) < 0) {
port = 80;
} else {
port = Integer.parseInt(host.substring(pos + 1));
host = host.substring(0, pos);
}